package com.joysuch.wwyt.bp.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author ZhangDong
 * @Date 2020/12/10 11:44
 */
public enum InvestigateTaskStatus {

    NEED(1,"待完成"),
    NO(2,"未完成"),
    DONE(3,"已完成"),
    BY(4,"被完成"),
    OVERDUE(5,"逾期完成");

    private Integer value;
    private String status;

    public String getStatus() {
        return status;
    }
    public final Integer getValue() {
        return value;
    }

    InvestigateTaskStatus(Integer value, String status) {
        this.value = value;
        this.status = status;
    }
    private static final Map<Integer, InvestigateTaskStatus> lookup = new HashMap<>();

    static {
        for (InvestigateTaskStatus e : EnumSet.allOf(InvestigateTaskStatus.class)) {
            lookup.put(e.value, e);
        }
    }

    public static InvestigateTaskStatus find(Integer value) {
        return lookup.get(value);
    }
}
